package com.mobi.Survey;

import android.os.Bundle;
import android.os.Handler;

import com.appbucks.sdk.AppBucksAPI;
import com.mobi.Survey.utils.Helper;

/**
 * 
 * <p>
 * <b>Author:</b> Yahya Arshad
 * <p>
 * <b>Company:</b> Mobi Media Soft
 * <p>
 * <b> Website:</b> www.mobimediasoft.com
 * <p>
 * SplashScreen.java Responsible for Displaying Splash Screen for
 * {@link #SPLASH_DISPLAY_TIME} milli secconds
 * <p>
 */
public class SplashScreen extends AbstractScreen
{

	private int SPLASH_DISPLAY_TIME = 2000;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{

		super.onCreate(savedInstanceState);

		Helper.createDirIfNotExists(Helper.APP_FOLDER);

		Handler handler = new Handler();

		handler.postDelayed(new Runnable()
		{

			@Override
			public void run()
			{
				switchScreenTo(LoginScreen.class);
			}
		}, SPLASH_DISPLAY_TIME);

	}

	@Override
	protected void initUiVars()
	{

	}

	@Override
	protected int getLayoutId()
	{

		return LayoutIds.SPLASH_SCREEN;
	}

	@Override
	protected void onRelease()
	{
		finish();
	}

}
